<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Return openSSL error message</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-encrypt.html">openssl_encrypt</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-free-key.html">openssl_free_key</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.openssl-error-string" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">openssl_error_string</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.6, PHP 5)</p><p class="refpurpose"><span class="refname">openssl_error_string</span> &mdash; <span class="dc-title">Return openSSL error message</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.openssl-error-string-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>openssl_error_string</strong></span>
    ( <span class="methodparam">void</span>
   )</div>

  <p class="para rdfs-comment">
   <span class="function"><strong>openssl_error_string()</strong></span> returns the last error from the
   openSSL library.  Error messages are queued, so this function should be
   called multiple times to collect all of the information. The last error will
   be the most recent one.
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.openssl-error-string-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns an error message string, or <strong><code>FALSE</code></strong> if there are no more error
   messages to return.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.openssl-error-string-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-835">
    <p><strong>Example #1 <span class="function"><strong>openssl_error_string()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;lets&nbsp;assume&nbsp;you&nbsp;just&nbsp;called&nbsp;an&nbsp;openssl&nbsp;function&nbsp;that&nbsp;failed<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">$msg&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">openssl_error_string</span><span style="color: #007700">())<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #0000BB">$msg&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #DD0000">"&lt;br&nbsp;/&gt;\n"</span><span style="color: #007700">;<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.openssl-encrypt.html">openssl_encrypt</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.openssl-free-key.html">openssl_free_key</a></div>
 <div class="up"><a href="ref.openssl.html">OpenSSL 函数</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
